<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../css/layout.css" rel="stylesheet" type="text/css" />
<link href="css/shop.manage.css" rel="stylesheet" type="text/css" />
<smart>include file ='../head.config.html'</smart>
</head>
<body>
<div id="container760"> <smart>include file ='../header.html'</smart> <smart>include file ='../PathLinksLevel.html'</smart> <smart>include file ='own_menu.html'</smart>
  <div style="float:right; width:600px;  display:block">
  	<div style="float:right; width:600px;  display:block">
	<UL class="item_list_title">
	  <LI class="selected"><strong>消息订阅</strong></LI>
    </UL>
<form name="mainform" id="mainform" action="own_remind.php?action=save" method="post" onsubmit="return checkform();" style="width:600px; float:right; display:block">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color:#e2f5ff; border:1px solid #00CCFF;  background-image:url(../templates/default/member/images/standard_msg_warning.gif); background-repeat:no-repeat; background-position:5px 20px">
    	<tr>
    		<td>
			<div style="padding:20px; padding-left:25px">
    				<ul style="list-style:circle">
    					<li style="height:25px">您希望获得哪些消息提醒？通过哪种方式获得？请在相应的选框内打勾。</li>
    					<li style="line-height:20px; height:25px">其中<span style="color:#FF0000"> *</span> 标志意味着该项通知是必需的；</br><input type="checkbox" checked name="hoar" value="hoar" disabled />表示该项消息接收方式是必需的，不能取消；<input type="checkbox" name="hoar" value="hoar" disabled />表示该项消息暂时不支持这种接收方式。</li>
    				</ul>
   			  </div>
			</td>
    	</tr>
    </table>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
    	<tr>
    		<td height="45" align="center" valign="middle">
			  <input type="submit" value="保存" />　 
		    <input type="button" value="  恢复默认设置  " onclick="if(confirm('确定要恢复默认设置吗？')){location.href='own_remind.php?action=default'}else{return false;}" /></td>
    	</tr>
    </table>
	<table width="100%" height="13"  border="0" cellpadding="0" cellspacing="0" style="border-bottom:2px solid #336699">
		<tr>
			<td width="60%" height="25" align="center" bgcolor="#cbe4f4">信息内容</td>
			<td width="20%" height="25" align="center" bgcolor="#cbe4f4">邮件</td>
			<td width="20%" height="25" align="center" bgcolor="#cbe4f4">站内信</td>
		</tr>
	</table>	
	<div  style="padding-top:10px; width:580px;padding-left:20px">
	<smart> foreach from=$remind_array item=one </smart>
	</div>
			<table width="100%" height="13"  border="0" cellpadding="0" cellspacing="0">
              	<tr>
              		<td style=" height:20px; background-color:#ecf4fb"><smart> $one.name </smart></td>
             	</tr>
          	</table>
			
			<div style="padding-top:10px; width:580px;padding-left:20px">
			<smart> foreach from=$one.body item=two </smart>
			<table width="100%" height="13"  border="0" cellpadding="0" cellspacing="0">
              	<tr>
              		<td  style="padding-top:10px; width:580x"><smart> $two.name </smart></td>
             	</tr>
			</table>
				<tr>
				<td  style="padding-top:10px; width:580px;padding-left:20px"><smart> foreach from=$two.body item=three </smart></td>
				</tr>
		</div>


				<table height="13"  border="0" cellpadding="0" cellspacing="0" style=" color:#005fa9; width:600px; border-bottom:1px solid #D7D7D7">
					<tr>
						<td width="60%" height="25" style="padding-left:30px"><smart> if $three.must eq '1' </smart> <span style="color:#FF0000">*</span>
					  <input type="hidden" name="<smart> $three.tag </smart>_must" id="<smart> $three.tag </smart>_must" value="true" /><smart> else </smart> <input type="hidden" name="<smart> $three.tag </smart>_must" id="<smart> $three.tag </smart>_must" value="false" /> <smart> /if </smart><smart> $three.name </smart></td>
						<td width="20%" height="25" align="center" style="border-left:1px dashed #D7D7D7">
						<smart> assign var=name value=$three.tag </smart>
						<input type="checkbox" <smart> if $three.$name.mail_check eq '1' </smart>checked="checked" <smart> /if </smart> <smart> if $three.mail_disabled eq '1' </smart> disabled="disabled" <smart> /if </smart> id="<smart> $three.tag </smart>_mail" name="<smart> $three.tag </smart>_mail" value="1"/>						</td>
						<td width="20%" height="25" align="center"  style="border-left:1px dashed #D7D7D7">
						<input type="checkbox" <smart> if $three.$name.msg_check eq '1' </smart>checked="checked" <smart> /if </smart> <smart> if $three.msg_disabled eq '1' </smart> disabled="disabled" <smart> /if </smart> id="<smart> $three.tag </smart>_msg" name="<smart> $three.tag </smart>_msg" value="1" />						</td>
						<input type="hidden" name="tag" value="<smart> $three.tag </smart>">
					</tr>
		</table>
				<div style="width:580px; padding-left:20px">
				<smart> /foreach </smart>
			<smart> /foreach </smart>
	<smart> /foreach </smart>
	</div>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
    	<tr>
    		<td align="center">
				<input type="submit" value="保存" />　
				<input type="button" value="  恢复默认设置  " onclick="if(confirm('确定要恢复默认设置吗？')){location.href='own_remind.php?action=default'}else{return false;}" />
			</td>
    	</tr>
    </table>
	<div style="clear:both"></div>
</form>
<div style="clear:both"></div>
	</div>
	<div style="clear:both"></div>
  </div><div style="clear:both"></div>
  <smart>include file ='../footer.html'</smart></div>
</body>
<script>
	function checkform()
	{
		//检查必选的，是否已选
		var es = document.forms['mainform'].elements['tag'];
		for( var i = 0; i<es.length; ++i ){
			var e = es[i];
			var msg_necessary = document.forms['mainform'].elements[e.value+'_must'];
			if( msg_necessary.value == 'true' )
			{
				var checked = "false";
				var ns = document.forms['mainform'].elements[e.value+'_mail'];
				var ms = document.forms['mainform'].elements[e.value+'_msg'];
    			if( ns.checked || ms.checked )
				{
					checked = "true";
				}
				if( checked == "false" )
				{
					alert("带 * 的地方，请选择一种发送方式!");
					window.location = "#" + e.value + '_mail';
					return false;
				}
			}
		}
		return true;
	}
</script>
</html>
